<template>
  <div class="stroke_detail">
    <div class="title_box">
      <img src="@/assets/images/echarts/组1.png" alt="" />
      <div class="title">{{ title }}</div>
      <div class="btn" @click="router" v-if="url!=''">详情</div>
    </div>
    <div class="ech_box">
      <slot></slot>
    </div>
  </div>
</template>

<script>
import fontSize from "@/modules/fontSize";
export default {
  props: {
    title: {
      // 标题
      type: String,
      default: "",
    },
    url: {
      // 标题
      type: String,
      default: "",
    },
  },
  created() {},
  data() {
    return {
      vueFontSize: fontSize,
    };
  },
  methods: {
    router() {
      this.$router.push(this.url);
    },
  },
};
</script>

<style scoped lang="scss">
.stroke_detail {
  width: 100%;
  //   background: red;
  height: 100%;
  .title_box {
    height: 40px;
    background: #124b88;
    display: flex;
    width: 100%;
    border-top: 1px solid #42a9ff;
    border-bottom: 1px solid #42a9ff;
    padding: 0 10px 0 5px;
    align-items: center;
    position: relative;
    img {
      width: 20px;
      height: 20px;
      margin-left: 2px;
    }
    .title {
      font-size: 16px;
      font-family: Source Han Sans CN, Source Han Sans CN-Bold;
      font-weight: bold;
      text-align: left;
      color: #ffffff;
      height: 40px;
      line-height: 40px;
      margin-left: 14px;
    }
    .btn {
      width: 53px;
      height: 22px;
      opacity: 1;
      background: #1cbf24;
      border: 1px solid rgba(0, 156, 255, 0.52);
      color: #d4f0ff;
      font-size: 12px;
      border-radius: 14px;
      text-align: center;
      line-height: 21px;
      position: absolute;
      cursor: pointer;
      right: 10px;
    }
    @media screen and (max-width: 960px) {
      .btn {
        // transform: scale(0.8);
        // -webkit-transform: scale(0.8); /*兼容-webkit-引擎浏览器*/
        // -moz-transform: scale(0.8); /*兼容-moz-引擎浏览器*/
        width: 50px;
        height: 24px;
        font-size: 14px;
        // background: ;
        line-height: 24px;
      }
    }
  }
  .ech_box {
    width: 100%;
    height: calc(100% - 40px);
  }
}
</style>